<%@page import="com.soda.util.SelectStudentCondition"%>
<%@page import="com.soda.util.PageInfo"%>
<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<%
SelectStudentCondition ssc=(SelectStudentCondition)session.getAttribute("condi");
if(ssc==null){
	ssc=new SelectStudentCondition("","");	
}
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>"/>
<title>soda创业教育平台</title>
<link href="houtai/css/style.css" rel="stylesheet" type="text/css" />

<script type="text/javascript" src="houtai/js/main.js"></script>
<script type="text/javascript" src="houtai/js/student.js"></script>

</head>
<body>

<table width="100%" height="100%" border="0" cellspacing="0" cellpadding="3">
  <tr>
    <td style="height:25px; background-color:#f3f3f3; font-weight:bold" valign="top">
    &nbsp;&nbsp;&nbsp;&nbsp;当前位置：
    <img src="houtai/images/arrow.gif" align="absmiddle">&nbsp;&nbsp;soda船业教育平台&nbsp;&nbsp;
    <img src="houtai/images/arrow.gif" align="absmiddle">&nbsp;&nbsp;后台管理&nbsp;&nbsp;
    <img src="houtai/images/arrow.gif" align="absmiddle">&nbsp;&nbsp;学生管理</td>
  </tr>
  <tr>
    <td style="height:34px; background-image:url(houtai/images/main_header.gif); border-bottom:1px solid #cfd8e0; padding:0px">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="20" height="34"><img src="houtai/images/main_headerL.gif" width="20" height="34"></td>
          <td style="color:#90c8e8;"><img src="houtai/images/icon_card.gif" width="16" height="16" align="absmiddle">&nbsp;&nbsp;<strong>学生管理</strong></td>
          <td align="right" class="white" style="padding-right:20px"><a href="add.jsp" class="barBtn" onClick="location.href='add.jsp'"> <a class="barBtn" onClick="javascript:history.go(-1);"><img src="houtai/images/btn_left.gif" align="absmiddle"> 后退</a> <a  class="barBtn" onClick="javascript:history.go(+1);"><img src="houtai/images/btn_right.gif" align="absmiddle"> 前进</a> <a href="javascript:refresh()" class="barBtn"><img src="houtai/images/btn_refresh.gif" align="absmiddle"> 刷新</a></td>
        </tr>
    </table></td>
  </tr>
  <tr>
    <td style="height:30px; background-color:#bddbff; border-bottom:1px solid #cfd8e0;"><table width="100%" border="0" cellpadding="3" cellspacing="1" class="table1">
      <TR>   	
        <th width="10%" align="center">学生姓名</th>
        <td width="20%" class="BGCgray"><input type="text" name="stuname" id="stuname" value="<%=ssc.getStuname()==null?"":ssc.getStuname() %>"></td>
        <th width="10%" align="center">身份证</th>
        <td width="20%" class="BGCgray"><input type="text" name="stuid" id="stuid" value="<%=ssc.getIdcard()==null?"":ssc.getIdcard() %>"></td>
        <th width="10%" align="center"><BUTTON type="submit" style="HEIGHT:25px" onClick="select()"><img src="houtai/images/btn_search.gif" width="16" height="16" align="absmiddle"> 查询</BUTTON></th>
        </TR>
    </table></td>
  </tr>
  <tr>
    <td height="100%" valign="top">
    <div style="overflow:auto;height:100%; width:100%">
      <table width="100%" border="0" cellpadding="3" cellspacing="1" class="table1">
        <TR>
          <th align="center"><input type="checkbox" name="checkbox1" id="checkbox1" onclick=""></th>
          <th align="center">姓名</th>
          <th align="center">性别</th>
          <th align="center">年龄</th>
          <th align="center">学校</th>
          <th align="center">身份证</th>          
          <th align="center">专业</th>
          <th width="200" align="center">操作</th>
          </TR>
          <c:forEach items="${stulist}" var="stus">
        <TR>
          <TD align="center"><input type="checkbox" name="checkbox2" id="checkbox2" onclick=""></TD>
          <TD align="center">${stus.stuName }</TD>
          <TD align="center">${stus.stuSex==1?"男":"女" }</TD>
          <TD align="center">${stus.stuAge }</TD>
          <TD align="center">${stus.stuSchool }</TD>
          <TD align="center">${stus.stuIdcard }</TD>
          <TD align="center">${stus.stuMajor }</TD>
          <TD width="200" align="center"><BUTTON style="height:21px; font-size:12px" onClick="selectStu(${stus.stuId})">查看</BUTTON> <BUTTON style="height:21px; font-size:12px" onClick="editStu(${stus.stuId})">编辑</BUTTON><BUTTON style="height:21px; font-size:12px" onClick="deleteStu(${stus.stuId})">删除</BUTTON></TD>
         </TR>
         </c:forEach>
       
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="20%" height="25"><table border="0" cellspacing="0" cellpadding="3">
            <tr>    
           <%
			PageInfo pi=(PageInfo)session.getAttribute("page");	
		 %>
		 
              <td><a href="<%=request.getContextPath() %>/StudentServlet?page=1&method=selectCon" style="color:black;">首页</a></td>
              <td><a href="<%=request.getContextPath() %>/StudentServlet?page=<%=pi.getPage()-1%>&method=selectCon" style="color:black;">上一页</a></td>
              <td><a href="<%=request.getContextPath() %>/StudentServlet?page=<%=pi.getPage()+1%>&method=selectCon" style="color:black;">下一页</a></td>
              <td><a href="<%=request.getContextPath() %>/StudentServlet?page=<%=pi.getLastPage()%>&method=selectCon" style="color:black;">尾页</a></td>
            </tr>
          </table>
          </td>
          <td width="20%" align="center">
          <table border="0" cellspacing="0" cellpadding="3">
            <tr>  
           
         
              <td><a href="javascript:sepage(<%=pi.getLastPage() %>)" style="color:black;">GO</a></td>
              <td><input name="textfield23" id="pa" type="text" size="3" style="width:25;height:18"> /页</td>
          
                               
            </tr>
          </table></td>
          <td width="20%" align="right">共<%=pi.getTotal() %>条记录显示到<%=pi.getPage() %>/<%=pi.getLastPage() %></td>
        
         
          
        </tr>
      </table>
    </div>
  </td>
  </tr>
</table>

</body>
</html>